package com.sikaryofficial.backend.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sikaryofficial.backend.domain.dto.req.music.MusicLibraryListReq;
import com.sikaryofficial.backend.domain.dto.resp.music.MusicLibraryDTO;
import com.sikaryofficial.backend.domain.entity.Music;
import com.sikaryofficial.backend.mapper.MusicMapper;
import com.sikaryofficial.backend.service.IMusicService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 音乐Service业务层处理
 *
 * @author qinjinyuan
 * @date 2024-08-07
 */
@Service
public class MusicServiceImpl extends ServiceImpl<MusicMapper, Music> implements IMusicService {
    @Autowired
    private MusicMapper musicMapper;
    /**
     * 查询歌曲分类
     *
     * @param customerPage
     * @param req
     * @return
     */
    @Override
    public IPage<MusicLibraryDTO> musicPageList(Page<MusicLibraryDTO> customerPage, MusicLibraryListReq req) {
        return musicMapper.musicPageList(customerPage,req);
    }

    /**
     * 查询歌曲分类
     *
     * @param customerPage
     * @param req
     * @return
     */
    @Override
    public IPage<MusicLibraryDTO> musicBackendPageList(Page<MusicLibraryDTO> customerPage, MusicLibraryListReq req) {
        return musicMapper.musicBackendPageList(customerPage,req);
    }
}
